<#include "user_manager_header.ftl">

			<ul class="nav nav-tabs">
			  <li class="active"><a>区划管理</a></li>
			  <li><a href="region_create">新增区划</a></li>
			</ul>
			
			<div><p></p></div>

			<div class="panel panel-default">
			   <div class="panel-body">

					<form class="form-horizontal" role="form" id="form" method="post" action="region_create">
					  <div class="form-group">
					    <label for="typename" class="col-sm-2 control-label">区域编码</label>
					    <div class="col-sm-6">
					      <input type="hidden" class="form-control" value="${action?if_exists}" name="action" id = "action"/>
					      <input type="text" class="form-control" value="${(region.regionCode)?if_exists}" name="regioncode" id="regioncode" placeholder="区域编码" required autofocus/>
					    </div>
					  </div>
					  
					   <div class="form-group">
					    <label for="typename" class="col-sm-2 control-label">区划名称</label>
					    <div class="col-sm-6">
					      <input type="text" class="form-control" value="${(region.regionName)?if_exists}" name="regionname" id="regionname" placeholder="区划名称" required/>
					    </div>
					  </div>
					  
					   <div class="form-group">
					    <label for="typename" class="col-sm-2 control-label">区划备注</label>
					    <div class="col-sm-6">
					      <input type="text" class="form-control" value="${(region.regionMemo)?if_exists}" name="regionmemo" id="regionmemo" placeholder="区划备注" />
					    </div>
					  </div>
					  
					  <div class="form-group">
					    <label for="typename" class="col-sm-2 control-label">城市简称</label>
					    <div class="col-sm-6">
					      <input type="text" class="form-control" value="${(region.nickName)?if_exists}" name="nickname" id="nickname" placeholder="城市简称" />
					    </div>
					  </div>
					  
					  
					  <div class="form-group">
					    <label for="typename" class="col-sm-2 control-label">行政级别</label>
					    <div class="col-sm-6">
					      <input type="text" class="form-control" value="${(region.regionLevel)?if_exists}" name="regionlevel" id="regionlevel" placeholder="行政级别" required/>
					    </div>
					  </div>
					  
					  <div class="form-group">
					    <label for="typename" class="col-sm-2 control-label">上级统一编码</label>
					    <div class="col-sm-6">
					      <input type="text" class="form-control" value="${(region.parentCode)?if_exists}" name="parentcode" id="parentcode" placeholder="上级统一编码" />
					    </div>
					  </div>
					  
					  <div class="form-group">
					    <label for="typename" class="col-sm-2 control-label">上级名称</label>
					    <div class="col-sm-6">
					      <input type="text" class="form-control" value="${(region.parentName)?if_exists}" name="parentname" id="parentname" placeholder="上级名称" />
					    </div>
					  </div>
					  
					  <div class="form-group">
					    <label for="typename" class="col-sm-2 control-label">城市面积</label>
					    <div class="col-sm-6">
					      <input type="text" class="form-control" value="${(region.regionArea)?if_exists}" name="regionarea" id="regionarea" placeholder="城市面积" />
					    </div>
					  </div>
					  
					  <div class="form-group">
					    <label for="typename" class="col-sm-2 control-label">城市人口</label>
					    <div class="col-sm-6">
					      <input type="text" class="form-control" value="${(region.regionPopulation)?if_exists}" name="regionpopulation" id="regionpopulation" placeholder="城市人口" />
					    </div>
					  </div>
					  
					  <div class="form-group">
					    <label for="typename" class="col-sm-2 control-label">邮政编码</label>
					    <div class="col-sm-6">
					      <input type="text" class="form-control" value="${(region.regionPostCode)?if_exists}" name="regionpostcode" id="regionpostcode" placeholder="邮政编码" />
					    </div>
					  </div>
					  
					  <div class="form-group">
					    <label for="typename" class="col-sm-2 control-label">长途区号</label>
					    <div class="col-sm-6">
					      <input type="text" class="form-control" value="${(region.regionPhoneCode)?if_exists}" name="regionphonecode" id="regionphonecode" placeholder="长途区号" />
					    </div>
					  </div>
					  
					  <div class="form-group">
					    <label for="typename" class="col-sm-2 control-label">经度</label>
					    <div class="col-sm-6">
					      <input type="text" class="form-control" value="${(region.longitude)?if_exists}" name="longitude" id="longitude" placeholder="经度" />
					    </div>
					  </div>
					  
					  <div class="form-group">
					    <label for="typename" class="col-sm-2 control-label">纬度</label>
					    <div class="col-sm-6">
					      <input type="text" class="form-control" value="${(region.latitude)?if_exists}" name="latitude" id="latitude" placeholder="纬度" />
					    </div>
					  </div>
					  
					  	
					  <div class="form-group">
					    <label for="typename" class="col-sm-2 control-label">索引值</label>
					    <div class="col-sm-6">
					      <input type="text" class="form-control" value="${(region.sortIndex)?if_exists}" name="sortindex" id="sortindex" placeholder="索引值" />
					    </div>
					  </div>	
					  
					  				  
					  <div class="form-group">
					    <div class="col-sm-offset-2 col-sm-10">
					      <button type="submit" class="btn btn-default" ${typecode?if_exists}>提交</button>
					    </div>
					  </div>
					</form>
			      
			   </div> <!--/panel-body-->

			</div>	<!--/panel-->			
			
<#include "user_manager_footer.ftl">


<script type="text/javascript">
$().ready(function() {

	
	
	if(document.getElementById("action").value == "UPDATE")
	{
		document.getElementById("regioncode").readOnly=true;
	}

	//
	$("#form").validate({
		rules: {
			sortindex: {
				required: true,
				digits:true
			},
		},
		messages: {
			sortindex: {
				required: "请输入数字",
				digits: "必须为整型数字"
			},
		}
	});
	
	
	
	
	
	
});  
</script>

